<?php
namespace Admin\Controller;

class UploadController extends AdminController {
    public $oss_domain;
    public $upload_type;
    public $bucket;
    public $token;
    
    public function _initialize() {
        parent::_initialize();
        $this->oss_domain = UP_DOMAIN;
        $this->assign('oss_domain','http://'.$this->oss_domain);
        
        $this->token = "feigou";
        $this->bucket = OSS_BUCKET;
        $this->upload_type = C('UPLOAD_TYPE') ? C('UPLOAD_TYPE') : 'local';
        $this->siteUrl = $this->siteUrl ? $this->siteUrl : C('SITE_URL');
    }
    
    public function index(){
       
    }
    
    public function upload(){
        $targetDir = 'upload_tmp';
        $uploadDir = 'upload';

        $msg = R('Common/fileupload',array($targetDir,$uploadDir));
//        $this->zhAjaxReturn(1001, null, array(
//            'savepath' => $msg,
//        ));
//        $this->ajaxReturn(array('msg'=>$msg));
        echo $msg;
    }
}